-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: token provider #6927
feat: token provider #6927
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that we could refactor things in a way that the email
provider essentially just implements the token provider, so we don't need another provider type, just renaming "email"
to "token"
internally.
9784f29
to
37bb6eb
Compare
6ad7af2
to
12aed9f
Compare
12aed9f
to
c206959
Compare
@balazsorban44 do you think we should 🚢 this with v5? Let me know what you think of the current state of this PR. 👀 |
Cross posting my RFC #1465 comment for reference |
fa96b45
to
65aa467
Compare
☕️ Reasoning
This PR introduces the following changes:
tokenId
andtokenIdVerified
toAdapterUser
. We set them similar to how we setemail
andemailVerified
.email
andemailVerified
are kept around to keep migration effort low.adapter.getUserByEmail
is changed toadapter.getUserByTokenId
. This requires a lot of changes to follow in the adapters package.Token
provider. By default, it will throw an error forsendVerificationToken
, signaling that if the developer use this provider, they should implement this method.Email
provider is nowSmtpEmail
provider with specific settings for SMTP-based email servers. It works just like before, the name changing should not break anything, since this is a defaultexport
. This is to distinguish with the other HTTP-based email provider that we want to add in the future, like SendGrid.🧢 Checklist
🎫 Affected issues
Please scout and link issues that might be solved by this PR.
Addressing #1465
📌 Resources